Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: follow a default directory structure for V projects #25

Merged
merged 1 commit into from
Mar 16, 2024

Conversation

ttytm
Copy link
Member

@ttytm ttytm commented Mar 14, 2024

Will allow use v [options] [command] [arguments] in the root of the project.

Like v . to build the project. When VPM progresses to allow for binary installations, following the default directory structure will eventually allow to install binary projects like this directly via the package manager.

Copy link
Member

@spytheman spytheman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work!
I did not like the cmd/ folder too.

Making v . immediately useful for building the project is also very welcome.

@spytheman spytheman merged commit 0b5e562 into vlang:main Mar 16, 2024
12 checks passed
@ttytm ttytm deleted the build/update-project-structure branch March 16, 2024 15:49
@JalonSolov
Copy link

The cmd/ folder is useful for those wanting to unit-test their main function, in a application. Put main.v in the root, that all it does is import cmd and call the real start of the program. Nothing to really test, there.

But then everything in cmd should be unit-testable, which means 99+% of your app, instead of only 99+% of whatever is NOT inside main.

However, it definitely doesn't need to be the default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants